<template>
  <div>
    <Modal :value="visible" width="360" :closable="false">
      <p slot="header" style="color:#f60;text-align:center">
        <Icon type="ios-information-circle"></Icon>
        <span>提示</span>
      </p>
      <p style="font-size:15px;text-align:center">{{alertMsg}}</p>
      <p slot="footer" style="text-align:center" v-if="isLogin">
          <Button type="info" @click="confirm">确认</Button>
      </p>
      <p slot="footer" style="text-align:center" v-else>
          <Button type="info" @click="confirm">确认</Button>
          <Button type="warning" @click="cancel">取消</Button>
      </p>
    </Modal>
  </div>
</template>

<script>
export default {
  props:{
    isAlertVisible:Boolean,
    alertMsg:String,
    isLogin:Boolean
  },
  data() {
    return {
        
    };
  },
  methods: {
      cancel(){
          this.$emit('alertCancel')
      },
      confirm(){
          this.$emit('alertConfirm')
      },
  },
  computed:{   
    visible(){
      return this.isAlertVisible
    }
  }
};
</script>

<style>
</style>
